<template>
    <div id="paging">
        <div class="block">
            <el-pagination
            :current-page.sync="currentPage"
            :page-size="show_product_num"
            layout="prev, pager, next, jumper"
            :total="length">
            </el-pagination>
        </div>
    </div>
</template>

<script>
export default {
    name:'supplyProducts',
    methods: {
    //   handleSizeChange(val) {
    //     // console.log(`每页 ${val} 条`);
    //   },
    //   handleCurrentChange(val) {
    //     // console.log(`当前页: ${val}`);
    //   },
      getCurrentpage(){
          return this.currentPage
      }
    },
    watch:{
        currentPage:function(){
            this.$emit('getCurrentpage',this.currentPage)
        }
    },
    data() {
        return {
            currentPage:1,
        }
    },
    props:{
        show_product_num:Number,
        length:Number
    }
}
</script>

<style lang="less" scoped>
#paging{
    .block .el-pagination{
        text-align: center;
    }
}
</style>